var o, e = require, t = module, n = exports, i = this && this.__extends || (o = function(t, e) {
    return (o = Object.setPrototypeOf || {
        __proto__: []
    } instanceof Array && function(t, e) {
        t.__proto__ = e;
    } || function(t, e) {
        for (var s in e) e.hasOwnProperty(s) && (t[s] = e[s]);
    })(t, e);
}, function(t, e) {
    function s() {
        this.constructor = t;
    }
    o(t, e), t.prototype = null === e ? Object.create(e) : (s.prototype = e.prototype, 
    new s());
}), a = this && this.__decorate || function(t, e, s, o) {
    var i, r = arguments.length, p = r < 3 ? e : null === o ? o = Object.getOwnPropertyDescriptor(e, s) : o;
    if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) p = Reflect.decorate(t, e, s, o); else for (var a = t.length - 1; 0 <= a; a--) (i = t[a]) && (p = (r < 3 ? i(p) : 3 < r ? i(e, s, p) : i(e, s)) || p);
    return 3 < r && p && Object.defineProperty(e, s, p), p;
};

Object.defineProperty(n, "__esModule", {
    value: !0
});

var r = e("GameConfig"), s = e("Global"), c = cc._decorator, l = c.ccclass, d = c.property, u = function(e) {
    function t() {
        var t = null !== e && e.apply(this, arguments) || this;
        return t.tag = "", t.isDebug = !1, t.target_type_list = [ s.Type.Default ], t.target_platform_list = [ s.Platform.Default ], 
        t.target_os_list = [ s.OS.Default ], t.target_type_expect_list = [], t.target_platform_expect_list = [], 
        t.target_os_expect_list = [], t;
    }
    return i(t, e), t.prototype.onLoad = function() {
        this.checkType() && this.checkPlatform() && this.checkOs() ? this.tag && (this.node.active = !r.GC.isVaild(this.tag)) : this.node.active = !1;
    }, t.prototype.checkType = function() {
        return !(-1 < this.target_type_expect_list.indexOf(s.Type.Browser) && cc.sys.isBrowser || -1 < this.target_type_expect_list.indexOf(s.Type.Mobile) && cc.sys.isMobile || -1 < this.target_type_expect_list.indexOf(s.Type.Native) && cc.sys.isNative || !(-1 < this.target_type_list.indexOf(s.Type.Default)) && (-1 < this.target_type_list.indexOf(s.Type.Browser) && !cc.sys.isBrowser || -1 < this.target_type_list.indexOf(s.Type.Mobile) && !cc.sys.isMobile || -1 < this.target_type_list.indexOf(s.Type.Native) && !cc.sys.isNative));
    }, t.prototype.checkPlatform = function() {
        return GA.isPlatform(GA.Platform.Android) && GA.Info.distributionChannel == GA.DistributionChannel.OPPO && (s.G.platform = s.Platform.OPPO), 
        this.target_platform_expect_list.indexOf(s.G.platform) < 0 && (-1 < this.target_platform_list.indexOf(s.Platform.Default) || -1 < this.target_platform_list.indexOf(s.G.platform));
    }, t.prototype.checkOs = function() {
        return !(-1 < this.target_os_expect_list.indexOf(s.OS.IOS) && cc.sys.os == cc.sys.OS_IOS || -1 < this.target_os_expect_list.indexOf(s.OS.Android) && cc.sys.os == cc.sys.OS_ANDROID || !(-1 < this.target_os_list.indexOf(s.OS.Default)) && (-1 < this.target_os_list.indexOf(s.OS.IOS) && cc.sys.os != cc.sys.OS_IOS || -1 < this.target_os_list.indexOf(s.OS.Android) && cc.sys.os != cc.sys.OS_ANDROID));
    }, a([ d ], t.prototype, "tag", void 0), a([ d ], t.prototype, "isDebug", void 0), 
    a([ d({
        type: [ s.Type ]
    }) ], t.prototype, "target_type_list", void 0), a([ d({
        type: [ s.Platform ]
    }) ], t.prototype, "target_platform_list", void 0), a([ d({
        type: [ s.OS ]
    }) ], t.prototype, "target_os_list", void 0), a([ d({
        type: [ s.Type ]
    }) ], t.prototype, "target_type_expect_list", void 0), a([ d({
        type: [ s.Platform ]
    }) ], t.prototype, "target_platform_expect_list", void 0), a([ d({
        type: [ s.OS ]
    }) ], t.prototype, "target_os_expect_list", void 0), a([ l ], t);
}(cc.Component);

n.default = u;